home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / elf11.zip / ELF.DOC < prev    next >
Text File  |  1988-10-28  |  3KB  |  85 lines

  1.                                   E - L - F
  2.  
  3.                            (E)rror  (L)evel  (F)ile
  4.  
  5.                                 Documentation
  6.  
  7.  
  8. INTRODUCTION:
  9.  
  10. ELF was written to fufill two needs:  The need to allow operator input
  11. in batch files, in the form of Yes/No answers, and the need to force
  12. ERRORLEVEL to a specified value.  The former function is available in
  13. several programs, but the latter is not.  ELF combines both into one
  14. easy to use program.
  15.  
  16. DISCLAIMER:
  17.  
  18. This program is placed in the public domain.  Permission is granted 
  19. to copy, give away, and distribute this package.  Permission is
  20. expressly denied to anyone to sell this software, other than nominal
  21. costs for media.  The user bears all responsiblity for testing & use.
  22. If ELF turns out to be a virus that wipes out your hardware, you have
  23. no-one to blame but yourself.  The source code is included for your safety.
  24. If the possiblity of trojan horse or virus programs disturbs you, please
  25. carefully examine the source code, and then re-assemble it yourself. If
  26. you didn't receive the source code, then request it from the source from
  27. which you received this software.  Alternately, close inspection with 
  28. a debugger is in order.  ELF is really a trivial program, so dis-assembly
  29. is easy.  In actuality, I have been using Public Domain software for years
  30. and have *never* had any problems, so the above is not intended to make
  31. you paranoid.  It is intended to protect the author of this, and the authors
  32. of all legitimate public domain or shareware software.  Enjoy.
  33.  
  34.  
  35. USE:
  36.  
  37. Invoke as:  ELF XX <CR>  where XX is a two digit HEXIDECIMAL number.  Hex
  38. was used out of pure laziness on the part of the programmer.  ELF will 
  39. simply terminate with the appropiate ERRORLEVEL set without printing anything.
  40. This is useful for "tacking-on" ERRORLEVEL control for batch files with
  41. programs that don't support ERRORLEVEL.  BASIC is a good example.  If
  42. running a BASIC program under a batch process, chain to ELF upon termination
  43. to set up an ERRORLEVEL parameter.  Remember that while ELF uses hex
  44. arguments, the ERRORLEVEL statement in your batch file uses the decimal
  45. equivalant.
  46.  
  47. The other form is:  ELF <CR>.  This will print (Y/N)? on the console, and
  48. wait for the Y or N key to be pressed. (Either case).  All other keys are
  49. ignored.  This is great for run time operator input with batch files.  I
  50. use it in my AUTOEXEC.BAT file to ask whether or not to attach my machine
  51. to our LAN.  Countless other uses could be thought of.  It sets ERRORLEVEL
  52. to 0 for a Y response, and to 255 for a N response.
  53. Example:
  54.  
  55. ECHO OFF
  56. CLS
  57. -
  58. -        {Rest of batch file}
  59. -
  60. ECHO Login to network?
  61. ELF
  62. IF ERRORLEVEL 255 GOTO END
  63. NETWORK       {Run NETWORK.BAT}
  64. :END
  65.  
  66.  
  67. This produces:
  68.  
  69. -
  70. -        {Other things in batch file}
  71. -
  72. Login to network?
  73. (Y/N)?
  74.  
  75.  
  76. Note:  If you'd rather not have the (Y/N)? prompt, either re-assemble
  77. the program, or patch the string with a debugger.  Replace the ( with a $.
  78.  
  79. v1.1, Toad Hall Tweak:
  80. - Reformatted source (ELF11.ASM) for ASM/MASM
  81. - Slight tweaks, no functional changes.
  82. David Kirschbaum
  83. Toad Hall
  84. kirsch@braggvax.ARPA
  85.